import { createRouter, RouteRecordRaw, createMemoryHistory } from 'vue-router'

// 类似 new VueRouter

const routes: RouteRecordRaw[] = [{
    path: '/',
    redirect: '/login'
},{
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login/Login.vue')
}]

const router = createRouter({
    routes,
    history: createMemoryHistory()   // 路由类型使用历史模式
})

export default router